package com.carpo.springtx;

import java.io.IOException;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.util.EntityUtils;


/**
 * 
 * 此处填写类简介
 * <p>
 * 此处填写类说明
 * </p>
 * @author liuhl-b
 * @since jdk1.6
 * 2018年4月16日
 *  
 */

public class TestRun {

	/**
	 * TODO
	 * @param args1111
	 * @throws IOException 
	 * @throws ClientProtocolException 
	 */
	public static void main(String[] args) throws ClientProtocolException, IOException {
		// TODO Auto-generated method stub
		HttpClient client = new DefaultHttpClient();
		HttpGet request = new HttpGet("http://localhost:8080/springtx/spittle/list");
		request.setHeader("Accept", "application/json");
		HttpResponse res = client.execute(request);
		String result = EntityUtils.toString(res.getEntity());
		System.out.println(result);
	}

}
